package com.mysoft.gfyx.clue.controller.option;

import com.mysoft.framework.modeling.dataapi.DataApi;
import com.mysoft.framework.modeling.dto.OptionItem;
import com.mysoft.framework.mvc.api.Controller;
import com.mysoft.framework.rpc.annotation.PubAction;
import com.mysoft.framework.rpc.annotation.PubService;
import com.mysoft.framework.rpc.contants.RequestPrefix;
import com.mysoft.gfyx.clue.service.AreaOptionService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@PubService(value = "/areaOptionWithProfitAndPermissionDataApi", prefix = RequestPrefix.API)
@Tag(name = "获取用户权益和权限省市-API-目前仅用在研发自测,没有前端调用")
public class AreaOptionWithProfitAndPermissionDataApiController extends Controller implements DataApi {
    @Autowired
    AreaOptionService areaOptionService;

    @PubAction(value = "/areaOptionData", method = RequestMethod.POST)
    public List<OptionItem> areaOptionData() {
        return areaOptionService.getProfitWithPermissionAreaData();
    }
}
